﻿using ITXHWEB.Models;
using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Web.Mvc;
using WPFExcelReport;
using WPFExcelReport.Helpers;
using ITXHWEB.Infrastructure;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace ITXHWEB.Controllers
{
    public partial class WAFARBENController : ITXController
    {
        [ChildActionOnly]
        public ActionResult MNOWS07(string returnUrl)
        {
            ModelState.Clear();
            AUTOCHK();
            ViewBag.ReturnUrl = returnUrl;
            return PartialView();
        } 
        public void AUTOCHK()
        {
            if (MABF.IsWFReady)
                return;
            PM["ART"] = MABF.WFART.Substring(1, 20);
            PM["VAR"] = "  ";
            PM["FARBE"] = MABF.WFART.Substring(23, 10);
            PM["DES"] = MABF.WFART.Substring(1 + 20 + 2 + 10 * 4 + 7, 20);
            VHP.VWAF.NEWWA(PM);
            MABF.IsWFReady = true;
        } 
    }
}
